import { mock } from "mockjs";

// 模拟视频数据
const viodeData = mock({
  "data|14": [
    {
      "id|+1": 1, //生成id，自增1
      cover: "@Image('218x124')", //生成随机图片，大小
      title: "@ctitle(10,20)", //生成商品信息，长度为10-20个汉字
      content: "@ctitle(10,20)",
      img: "@Image('20x20')",
      name: "@cname",
      isVideo: "@boolean", // 视频还是图文
      thumbsUp: "@integer(100,1000)", // 点赞 100 到 1000 之间的整数
      collect: "@integer(100,1000)", // 收藏 100 到 1000 之间的整数
      "reply|1-5": [
        {
          "id|+1": 1,
          name: "@cname",
          content: "@ctitle(10,20)",
          day: "@integer(1,5)",
          img: "@Image()",
          addressCity: "@city(true)",
          "replyChildre|1-2": [
            {
              "id|+1": 1,
              name: "@cname",
              content: "@ctitle(10,20)",
              day: "@integer(1,5)",
              img: "@Image()",
              addressCity: "@city(true)",
            },
          ],
        },
      ],
    },
  ],
});
mock(/api\/video/, "get", () => viodeData);
